package cn.alcatraz.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
public class AjaxResult {

    private Boolean success = true;

    private String message = "操作成功！";

    private Object resultObj;

    // 创建AjaxResult对象的静态方法
    public static AjaxResult myself(){
        return new AjaxResult();
    }

    // 自定义的set方法
    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    // 自定义的set方法
    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }

    // 自定义的set方法
    public AjaxResult setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }
}
